<%-- 
    Document   : quanlycauhoi
    Created on : Sep 15, 2012, 8:50:54 PM
    Author     : Odotube
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="thitracnghiem.MonThi"%>
<%@page import="thitracnghiem.GiaoVien"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%@include file="/menugv.html"%>
        <%

            session = request.getSession();
            GiaoVien gv = (GiaoVien) session.getAttribute("gv");
            if (gv == null) {
                response.sendError(403);
                return;
            }
        %>
        <form action="/ThiTracNghiem/XuLy" method="post">
            <%
                String s = "";
                s=request.getParameter("tb");
                if(s==null) s="";
                MonThi.Open();
                ArrayList<MonThi> dsMonThi = MonThi.getDSMonThi(gv.getPhanQuyenMon());
                MonThi.Close();
                s += "<select name=monthi>";
                for (int i = 0; i < dsMonThi.size(); i++) {
                    s += "<option value=" + dsMonThi.get(i).getMaMonThi() + ">" + dsMonThi.get(i).getTenMonThi();
                }
                s += "</select>";
            %>
            <input type="hidden" name="yc" value="quanlycauhoi">
            <%=s%><br>
            <input type="submit" name="chonmonthi" value="Xem cau hoi"><br>
            

            <%
                StringBuilder msb = new StringBuilder();
                msb = (StringBuilder) session.getAttribute("dscauhoi");
                if (msb != null && !msb.equals("")) {
                    out.println(msb);
                }
            %>
        </form><br>
    </body>
</html>
